package com.syedu.day08;

/**
 * @Description 测试类
 * @createTime 2022/3/17 9:26
 * @author Administrator
 */
public class TestAnimal {
    public static void main(String[] args) {
        //创建对象
        Cat cat = new Cat("英短","白色",99.99);
        //访问公共的属性和方法
        //cat.setType("英短");
        //cat.setColor("白色");
        //访问特有属性和方法
        //cat.setMeng(99.99);
        System.out.println(cat.getType() + "," + cat.getColor());
        cat.eat();
        cat.sleep();
        cat.catchMouse();

        Dog dog = new Dog("金毛","棕色",99.9);
        //dog.setType("金毛");
        //dog.setColor("棕色");
        //dog.setLoy(99.99);
        System.out.println(dog.getType() + "," + dog.getColor());
        dog.eat();
        dog.sleep();
        dog.watchDoor();

        System.out.println("----------------------------------");

        Cat newCat = new Cat();
    }
}
